$OpenBSD: patch-src_e-mail-formatter-evolution-rss_c,v 1.3 2016/10/31 12:34:30 ajacoutot Exp $

From 7741ef0cf3327cb5c719912358443b6aef3bdb59 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Wed, 17 Aug 2016 18:43:48 +0200
Subject: Adapt to changes in evolution 3.21.90

--- src/e-mail-formatter-evolution-rss.c.orig	Wed Apr  1 13:23:18 2015
+++ src/e-mail-formatter-evolution-rss.c	Mon Oct 31 13:19:55 2016
@@ -52,6 +52,7 @@ G_DEFINE_DYNAMIC_TYPE (
 
 static const gchar* rss_formatter_mime_types[] = { "x-evolution/evolution-rss-feed", NULL };
 
+#if EVOLUTION_VERSION < 32190
 static void
 set_view_cb (GtkWidget *button,
 		gpointer *data)
@@ -60,6 +61,8 @@ set_view_cb (GtkWidget *button,
 	rss_set_changed_view(1);
 	e_mail_display_reload (rss_get_display());
 }
+#endif
+
 #include "fetch.h"
 
 typedef struct _HD HD;
@@ -132,7 +135,11 @@ emfe_evolution_rss_format (EMailFormatterExtension *ex
 	if (!rss_init)
 			goto fail;
 
+#if EVOLUTION_VERSION >= 32190
+	h = e_web_view_get_content_html_sync (E_WEB_VIEW (rss_get_display()), NULL, NULL);
+#else
 	h = g_strdup(e_web_view_get_html (E_WEB_VIEW (rss_get_display())));
+#endif
 
 	website = (gchar *)camel_medium_get_header (
 			CAMEL_MEDIUM (message), "Website");
@@ -375,6 +382,7 @@ e_mail_formatter_evolution_rss_type_register (GTypeMod
 	e_mail_formatter_evolution_rss_register_type (type_module);
 }
 
+#if EVOLUTION_VERSION < 32190
 static GtkWidget *
 emfe_evolution_rss_get_widget (EMailFormatterExtension *extension,
 				EMailPartList *context,
@@ -399,13 +407,16 @@ emfe_evolution_rss_get_widget (EMailFormatterExtension
 	gtk_widget_show(box);
 	return box;
 }
+#endif
 
 static void
 e_mail_formatter_evolution_rss_class_init (EMailFormatterExtensionClass *class)
 {
 	class->mime_types = rss_formatter_mime_types;
 	class->format = emfe_evolution_rss_format;
+#if EVOLUTION_VERSION < 32190
 	class->get_widget = emfe_evolution_rss_get_widget;
+#endif
 	class->display_name = _("Evolution-RSS");
 	class->description = _("Displaying RSS feed articles");
 }
